Conventionally, an inverter device for detecting current by current detecting device provided for a DC part in an inverter is known. For example, in Patent Literature 1, a control is performed to generate a zero voltage vector of one kind in each of a first-half period and a second-half period of a cycle in order to detect current at predetermined timings.
However, in the case of generating a zero voltage vector of one kind in each of the first-half period and the second-half period of a PWM cycle like in Patent Literature 1, for example, when the duty is close to 0% or 100%, an instruction voltage and the duty do not match due to the influence of dead time. Consequently, current waveform is distorted, and a torque ripple, sound, vibration, or the like occurs.    Patent Literature 1: Japanese Patent No. 3,610,897